# coding: utf-8
from Tkinter import *
import math

import time
def run():
    print 'run!'

def my_circle(x, y, r):
    x2 = x + r
    y2 = y
    for i in range(1, 11):
        x1 = x2
        y1 = y2
        x2 = r * math.cos(i) + x
        y2 = r * math.sin(i) + x
        canvas.create_line(x1, y1, x2, y2)
        
    
root = Tk()
root.title('Gears')
root.geometry('300x300')
btn1 = Button(root, text="Run", command=run)
btn1.pack()

canvas = Canvas(root, width=300, height=300)
canvas.pack()
circle = canvas.create_oval(140,140,160,160)
text = canvas.create_text(260,260, text="alex 2012", fill="purple", 
        font=("Helvectica", "8"))

## рисование линий
canvas.create_line(140,140,160,160)

my_circle(100, 100, 30)

##расчет точек - математика


root.mainloop()
